package com.smart.model.util;

import com.smart.model.dtomapper.UserIdentificationDtoMapper;
import com.smart.model.domain.UserIdentificationDO;
import com.smart.model.vo.UserIdentificationVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class UserIdentificationConvert {

    public static List<UserIdentificationVO> buildUserIdentificationVoList(List<UserIdentificationDO> userIdentificationDOList) {
        if (CollectionUtils.isEmpty(userIdentificationDOList)) {
            return Lists.newArrayList();
        }
        List<UserIdentificationVO> userIdentificationVOList = new ArrayList<>();
        for (UserIdentificationDO userIdentificationDO : userIdentificationDOList) {
            userIdentificationVOList.add(UserIdentificationDtoMapper.INSTANCE.do2VO(userIdentificationDO));
        }

        return userIdentificationVOList;
    }
}
